package com.wang.pages;

import org.apache.tapestry5.annotations.Import;
import org.apache.tapestry5.annotations.InjectPage;
@Import(stylesheet="context:assets/css/site.css")
public class index {

	private String name;
	private String password;

	private String username;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@InjectPage
	private Home home;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	void onActivate() {
		System.out.println("INDEX onActivate:" + name);
		username = name;
	}

	void onPassivate() {
		System.out.println("INDEX onPassivate:" + name);
		username = name;
	}

	Object onSuccess() {
		username = name;
		System.out.println("username:" + username);
		home.setUsername(username);
		return home;

	}

}
